Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup scaffolding #6

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Setup scaffolding #6

merged 1 commit into from
Sep 5, 2023

Conversation

addievo
Copy link
Contributor

@addievo addievo commented Sep 4, 2023

Description

RPC is used currently inside Polykey to facilitate the client service and agent service.

We want to use the RPC for PKE and Polykey Desktop, so we want abstract it out into its own library.

This PR introduces the necessary scaffolding first, before we start working on the RPC internals.

Eventually it should replace the RPC code inside Polykey and Polykey can simply depend on @matrixai/rpc npm package.

Issues Fixed

Tasks

  • 1. Copy over scaffolding files from other existing repositories like js-logger (prior to the ESM upgrade)
  • 2. Update the README.md to change all urls to point to js-rpc
  • 3. Setup the CI/CD in gitlab so that all commits are being integrated there
  • 4. Update the package.json to point to js-rpc.
  • 5. Setup stub bench to bench RPC in the future

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@addievo addievo self-assigned this Sep 4, 2023
@addievo addievo requested a review from amydevs September 4, 2023 08:57
@addievo addievo added development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management labels Sep 4, 2023
@ghost
Copy link

ghost commented Sep 4, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@addievo addievo added this to the testnet7 milestone Sep 4, 2023
@addievo
Copy link
Contributor Author

addievo commented Sep 4, 2023

Int

@tegefaulkes
Copy link
Contributor

You shouldn't commit the .idea folder. Remove it and try not to push it up next time. You can add a .gitignore inside it to ignore that directory.

What did you do the main .gitignore file? Did you add every file inside the node_modules to it?

@addievo addievo changed the base branch from master to staging September 5, 2023 02:55
@CMCDragonkai CMCDragonkai changed the title feature-migration Setup scaffolding Sep 5, 2023
@CMCDragonkai CMCDragonkai removed this from the testnet7 milestone Sep 5, 2023
@CMCDragonkai
Copy link
Member

So we're going to split this PR up, this PR will focus only on scaffolding as a demonstration to @addievo. Anything related to the actual functionality of RPC will be in a separate PR.

@CMCDragonkai CMCDragonkai merged commit ed54a37 into staging Sep 5, 2023
addievo pushed a commit that referenced this pull request Oct 9, 2023
# This is the 1st commit message:

fix: RPCServer.start is now no longer a factory function

fix: fixed RPC tests after async-init change

# This is the commit message #2:

chore: updated inline documentation according to async-init changes

# This is the commit message #3:

wip: fixing imports

# This is the commit message #4:

wip: RPCServer deconstruction

# This is the commit message #5:

fix: RPCServer start stop order

# This is the commit message #6:

fix: added back createDestroy back to RPCClient

# This is the commit message #7:

chore: lintfix

# This is the commit message #8:

wip: completely removed create destroy from rpcclient

# This is the commit message #9:

fix: RPCClient tests after async-init changes

# This is the commit message #10:

wip

# This is the commit message #11:

fix: idgen is optional in constructor

# This is the commit message #12:

fix: type import in ./types

# This is the commit message #13:

chore: test for RPCServer force stopping

# This is the commit message #14:

fix: proper implementation of fromError toError, clientOutputTransformStream no longer outputs error.data, but rather error directly

# This is the commit message #15:

fix: jest fix for ErrorRPCRemote

# This is the commit message #16:

wip toError fromError

fix: proper implementation of fromError toError, clientOutputTransformStream no longer outputs error.data, but rather error directly

fix: changed rpcClient toError implementation

fix: changing ErrorRPCRemote constructor to be in-line with toError error creation constructor

fix: jest fix for ErrorRPCRemote

fix: fixing exports

fix: RPC errors now correctly extend AbstractError

fix: removed old events
fix: cleaned up imports
feat: client has toError as parameter
fix: removed type from JSONError obj
fix: startStop constructor correctly used
fix: infinity is definitely not == 1 minute

chore:  rename variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management
Development

Successfully merging this pull request may close these issues.

3 participants